package com.macrohard.admin.config.properties;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

@Component
@ConfigurationProperties(prefix = "file")
@Data
public class FileProperties {
	private String winPath;
	private String unixPath;
	private String profile;

	public String getPath() {
		String os = System.getProperty("os.name");
		if (os.toLowerCase().startsWith("win")) {
			return winPath;
		}else {
			return unixPath;
		}
	}
}
